dayue=[1,3,5,7,8,10,12]
def isRun(n):
    if n%100 ==0 and n%400==0:
        return True
    elif n%100!=0 and n%4==0:
        return True
    else:
        return False
def moth_days(y,m):
    if m in dayue:
        return 31
    elif isRun(y) and m==2:
        return 29
    elif isRun(y) is False and m==2:
        return 28
    else:
        return 30


# print(moth_days(2012,2))

lst=input().split()
print(lst)
s=0
for i in range(1,int(lst[1])):
    s+=moth_days(int(lst[0]),i)
    print(s)
s+=int(lst[2])
print(s)
